const adminRoute = [
  {
    path: '/admin',
    name: 'admin',
    component: () => import('@/components/admin/index.vue'),
    meta: { menu: { title: '首页', icon: 'el-icon-setting' } },
    redirect: '/admin/home',
    children: [
      {
        path: 'home',
        name: 'admin.home',
        component: () => import('@/views/admin/home.vue'),
      },
    ]
  }, {
    path: '/system',
    name: 'system',
    component: () => import('@/components/admin/index.vue'),
    meta: { menu: { title: '系统设置', icon: 'el-icon-setting' } },
    redirect: 'system/system',
    children: [
      {
        path: 'system',
        name: 'system.system',
        meta: { menu: { title: '系统管理', icon: 'el-icon-setting' } },
        component: () => import('@/views/admin/system/SystemList.vue'),
      }, {
        path: 'resource',
        name: 'system.resource',
        meta: { menu: { title: '资源管理', icon: 'el-icon-setting' } },
        component: () => import('@/views/admin/system/ResourceList.vue'),
      }, {
        path: 'dictionary',
        name: 'system.dictionary',
        meta: { menu: { title: '字典管理', icon: 'el-icon-setting' } },
        component: () => import('@/views/admin/system/DictionaryList'),
      },
    ]
  }, {
    path: '/permission',
    name: 'permission',
    meta: { menu: { title: '权限管理', icon: 'el-icon-setting' } },
    component: () => import('@/components/admin/index.vue'),
    redirect: 'permission/department',
    children: [
      {
        path: 'user',
        name: 'permission.user',
        meta: { menu: { title: '用户管理', icon: 'el-icon-setting' } },
        component: () => import('@/views/admin/permission/UserList.vue'),
      }, {
        path: 'department',
        name: 'permission.department',
        meta: { menu: { title: '部门管理', icon: 'el-icon-setting' } },
        component: () => import('@/views/admin/permission/DepartmentList'),
      }, {
        path: 'position',
        name: 'permission.position',
        meta: { menu: { title: '岗位管理', icon: 'el-icon-setting' } },
        component: () => import('@/views/admin/permission/PositionList'),
      }, {
        path: 'role',
        name: 'permission.role',
        meta: { menu: { title: '角色管理', icon: 'el-icon-setting' } },
        component: () => import('@/views/admin/permission/RoleList.vue'),
      },
    ]
  }
]

export default adminRoute
